package com.pai4j.pgc.controller;

import com.pai4j.common.bean.PAIResponseBean;
import com.pai4j.common.bean.PAIResponseBeanUtil;
import com.pai4j.pgc.service.relation.SubjectRelationService;
import com.pai4j.remote.pgc.SubjectRelationClient;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RestController;

import java.util.Set;

/**
 * 课程关系服务
 */

@RestController
public class SubjectRelationController implements SubjectRelationClient {
    
    
    @Resource
    private SubjectRelationService subjectRelationService;
    
    @Override
    public PAIResponseBean<Set<String>> getSubjectAllSubscriber(Integer relationType, Long subjectId){
        return PAIResponseBeanUtil.success(subjectRelationService.getAllSubscriber(relationType, subjectId));
    }
    
    
}
